package com.anime.model;

import androidx.lifecycle.MutableLiveData;

import com.blankj.utilcode.util.SPStaticUtils;

import java.util.ArrayList;
import java.util.List;

import constant.AppConstants;
import model.AnimeYHSearchModel;
import model.CarttonKKDirectoryModel;

public class ViewModelSwitch extends androidx.lifecycle.ViewModel {
    //    private MutableLiveData<Integer> speed;
    private MutableLiveData<Integer> searchName;
    private MutableLiveData<ArrayList<AnimeYHSearchModel.DataBean.ListBean>> yhdata;



    public MutableLiveData<Integer> getSwitch() {
        if (searchName == null) {
            searchName = new MutableLiveData<>();
            int anInt = SPStaticUtils.getInt(AppConstants.SWITCHKEY, 1);
            searchName.setValue(anInt);
        }
        return searchName;
    }


    public MutableLiveData<ArrayList<AnimeYHSearchModel.DataBean.ListBean>> getYHData() {
        if (yhdata == null) {
            yhdata = new MutableLiveData<>();
        }
        return yhdata;
    }

}
